#! /bin/bash

# get script dir
export SCRIPT_PATH=$(readlink -f ${BASH_SOURCE[0]})
export SCRIPT_DIR=$(dirname ${SCRIPT_PATH})

# import rsync functions
source $SCRIPT_DIR/rsync.sh

# do sync
# sshpass -p 123456 ssh ftptest@172.16.16.110 "mkdir -p /home/ftptest/image"
# sshpass -p 123456 ssh ftptest@172.16.16.110 "sshpass -p Aa123456 rsync -av --delete -e ssh shi.tan@172.31.3.12:/sdc/teleweb/T2-Goose /home/ftptest/image/"
_sync_ssh_to_ssh "172.31.3.12" "shi.tan" "Aa123456" "/sdc/teleweb/T2-Goose" "172.16.16.110" "ftptest" "123456" "/home/ftptest/image/"
_sync_ssh_to_ssh "172.31.3.12" "shi.tan" "Aa123456" "/sdc/teleweb/T2-Groot" "172.16.16.110" "ftptest" "123456" "/home/ftptest/image/"

# clean up
unset SCRIPT_PATH
unset SCRIPT_DIR



